package cn.practice._07springaop.egaop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestCartService {
    public static void main(String[] args) {

        // 获取bean对象
        ApplicationContext context = new AnnotationConfigApplicationContext(
                "cn.practice._07springaop"
        );

        //
        CartService cartService = context.getBean(CartService.class);
        cartService.addCart("赌博挂");

    }
}
